<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ include file="/assets/view/base/tag.jsp" %>
<!DOCTYPE html>
<head>
    <jsp:include page="/assets/view/common/head-meta.jsp"/>
    <title>${articleVo.title }</title>
    <meta name="Keywords" content="<c:forEach items="${articleVo.tagNameList}" var="tagName">${tagName},</c:forEach>mrcode,mrcod博客,markdown博客">
    <meta name="Description" content="${articleVo.summary}">
    <meta name="author" content="${articleVo.userAccount}">
    <link rel="stylesheet" href="/assets/lib/md/css/style.css"/>
    <link rel="stylesheet" href="/assets/lib/md/css/editormd.css"/>
    <jsp:include page="/assets/view/common/head-ui.jsp"/>
    <link rel="stylesheet" href="/assets/lib/bootstrap/css/docs.min.css">
</head>
<body>
<jsp:include page="/assets/view/common/header.jsp"/>
<jsp:include page="/assets/view/common/header-user.jsp"/>
<input type="hidden" id="articleId" value="${articleVo.id}">
<input type="hidden" id="userAccount" value="${articleVo.userAccount}">

<section class="container">
    <div class="row">
        <div class="col-md-9">
            <div class="detail-wrapper">
                <div class="d-header">
                    <div class="d-title art-fade">
                        <p class="text-left">${articleVo.title }</p>
                    </div>
                    <div class="d-info-wrapper art-fade">
                        <div class="tagname-wrapper">
                            标签：
                            <c:forEach items="${articleVo.tagNameList}" var="tagName">
                                <span class="label label-info">${tagName}</span>
                            </c:forEach>
                        </div>
                        <div class="tagname-wrapper">
                            分类：
                            <c:forEach items="${articleVo.categorys}" var="cat">
                                <a href="/${cat.userAccount}/article/category/${cat.id}" target="_blank">
                                    <span class="label label-success">${cat.name} <span class="badge">${cat.num}</span></span>
                                </a>
                            </c:forEach>
                        </div>
                        <ul class="d-footer list-inline">
                            <li><span class="icon-eye-open"/> ${articleVo.readNum}次阅读</li>
                   <%--         <li><span class="icon-comments"/> ${articleVo.commentNum} 评论</li>
                            <li><span class="icon-thumbs-up"/> ${articleVo.commentNum} 赞</li>
                            <li><span class="icon-thumbs-down"/> ${articleVo.commentNum} 踩</li>--%>
                            <li><span class="icon-time"/> 发布:<fmt:formatDate value="${articleVo.createTime}" pattern="yyyy-MM-dd HH:mm:ss"/></li>
                            <li><span class="icon-time"/>更新<span class="icon-arrow-up"/>:<fmt:formatDate value="${articleVo.modTime}" pattern="yyyy-MM-dd HH:mm:ss"/></li>
                        </ul>

                        <ul class="d-footer list-inline">
                            <%--<li>搜藏</li>--%>
                            <shiro:user>
                                <security:isMasterUser masterAccount='${articleVo.userAccount}'>
                                    <li>置顶</li>
                                    <li><a href="/auth/article/edit_pre/${articleVo.id}">编辑</a></li>
                                    <li><a href="javascript:void(0)" onclick="delArticle_open('${articleVo.id}','${articleVo.userAccount}')">删除</a></li>
                                    <%--<li><a href="#"><shiro:principal/></a></li>--%>
                                </security:isMasterUser>
                            </shiro:user>
                        </ul>

                    </div>
                </div>
                <div class="hr-simp"></div>
                版权声明：<%--本文为博主原创文章，可转载，请署名--%>未经许可,不可转载。
                <div class="hr-simp"></div>
                <div class="detail-body art-fade">
                    <div id="test-editormd-view">
                        <textarea style="display:none;" name="test-editormd-markdown-doc">###Hello world!</textarea>
                    </div>
                </div>
            </div>
            <div class="bdshare">
                <div class="bdsharebuttonbox"><a href="#" class="bds_more" data-cmd="more"></a><a href="#" class="bds_qzone" data-cmd="qzone" title="分享到QQ空间"></a><a href="#" class="bds_tsina" data-cmd="tsina" title="分享到新浪微博"></a><a href="#" class="bds_tqq" data-cmd="tqq" title="分享到腾讯微博"></a><a href="#" class="bds_renren" data-cmd="renren" title="分享到人人网"></a><a href="#" class="bds_weixin" data-cmd="weixin" title="分享到微信"></a></div>
                <span class="title">据说喜欢分享的,后来都成了大神</span>
            </div>


        </div>
        <div class="col-md-3">
            <div id="stickUpToc" style="z-index: 999999" class="mb-20">
                <a class="btn btn-mod btn-round width-pct-100" id="toc_btn">
                    <span class="icon-caret-down" style="margin-left: 0px"></span>  目     录
                </a>
                <div id="md-toc" style="display: none">
                    该文章还没有目录
                </div>
            </div>


            <jsp:include page="/assets/view/common/left.jsp"/>

        </div>
    </div>
    <div id="delArticle-modal" class="modal fade">
        <div class="modal-dialog modal-sm">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                    <h4 class="modal-title">温馨提示</h4>
                </div>
                <div class="modal-body">
                    <p>要把该文章删除并放入回收站吗？</p>
                </div>
                <div class="modal-footer align-center">
                    <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
                    <button type="button" class="btn btn-primary" onclick="delArticle('${articleVo.id}','${articleVo.userAccount}')">确定</button>
                </div>
            </div><!-- /.modal-content -->
        </div><!-- /.modal-dialog -->
    </div><!-- /.modal -->
</section>
<jsp:include page="/assets/view/common/footer.jsp"/>
<script src="/assets/lib/md/lib/marked.min.js"></script>
<script src="/assets/lib/md/lib/prettify.min.js"></script>
<script src="/assets/lib/md/lib/raphael.min.js"></script>
<script src="/assets/lib/md/lib/underscore.min.js"></script>
<script src="/assets/lib/md/lib/sequence-diagram.min.js"></script>
<script src="/assets/lib/md/lib/flowchart.min.js"></script>
<script src="/assets/lib/md/lib/jquery.flowchart.min.js"></script>
<script src="/assets/lib/md/js/editormd.js"></script>
<script src="/assets/js/usersCommon.js"></script>
<script src="/assets/lib/stickUp.js"></script>
<script src="/assets/js/article-detail.js"></script>
<script src="/assets/js/side.js"></script>
<script>
    side.userReadTopArticles('${articleVo.userAccount}');
    side.userCategorys('${articleVo.userAccount}');
    side.topReadArticles();
</script>
</body>
</html>
